package com.jdk.demo.map.linkedHashMap;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

public class Demo {

	public static void main(String[] args) {
		// LinkedHashMap<String, String> map = new LinkedHashMap<>();
		LinkedHashMap<String, String> map = new LinkedHashMap<>(8, 0.75f, true);
		map.put("b", "lili");
		map.put("a", "zsl");
		map.put("d", "wangliu");
		map.put("c", "zhaowu");
		map.put("d", "wangliu5");
		map.remove("d");
		Iterator<Map.Entry<String, String>> it = map.entrySet().iterator();
		while(it.hasNext()) {
			System.out.println(it.next());
			it.remove();
		}
	}

}
